/**
 *====================================================
 * 文件名称: FinanceCreditBulkstockServiceImpl.java
 * 修订记录：
 * No    日期				作者(操作:具体内容)
 * 1.    2015年11月19日	chenxy(创建:创建文件)
 *====================================================
 * 类描述：(说明未实现或其它不应生成javadoc的内容)
 */
package com.yuexunit.finance.project.service;

import java.util.List;

import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Restrictions;

import com.yuexunit.finance.project.entity.FinanceCreditBulkstockEntity;
import com.yuexunit.inject.annotation.Implements;
import com.yuexunit.persist.PersistUtil;

/**
 * @ClassName: FinanceCreditBulkstockServiceImpl
 * @Description: TODO(这里用一句话描述这个类的作用)
 * @author chenxy
 * @date 2015年11月19日 17:29:55
 */
@Implements(FinanceCreditBulkstockService.class)
public class FinanceCreditBulkstockServiceImpl implements FinanceCreditBulkstockService {

	@Override
	public void createFinanceCreditBulkstock(FinanceCreditBulkstockEntity entity) {
		PersistUtil.insert(entity);
	}

	@Override
	public FinanceCreditBulkstockEntity inquireFinanceCreditBulkstock(Long creditBulkstockId) {
		return PersistUtil.get(FinanceCreditBulkstockEntity.class, creditBulkstockId);
	}

	@Override
	public List<FinanceCreditBulkstockEntity> inquireFinanceCreditBulkstockList(Long creditId) {
		DetachedCriteria criteria = DetachedCriteria.forClass(FinanceCreditBulkstockEntity.class);
		criteria.add(Restrictions.eq("creditId", creditId));
		return PersistUtil.get(criteria);
	}

}
